package java8_31;

/**
 * @author oldliu
 * @since 1.0
 */
public class USBTest {
    public static void main(String[] args) {
        USBStorage u=new USBStorage("金士顿",32);
        System.out.println(u);
        u.plug();
        u.read();
        u.write();
        u.unplug();
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>");
        USB usb=new USBStorage("朗科",16);
        System.out.println(usb);
        usb.plug();
        //用不了。。。usb.read();
        //向下转型
//        USBStorage u2=(USBStorage)usb;
//        u2.write();
        ((USBStorage) usb).read();
        usb.unplug();

    }
}
